﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace FONCREAGROINTEGRAL.Models
{
    [MetadataType(typeof(valPersonal))]
    public partial class PERSONAL
    {
        [Bind(Exclude = "IdPersonal")]
        public class valPersonal
        {
            [Required(ErrorMessage = "* Paterno Obligatorio")]
            public object ApePaterno { get; set; }

            [Required(ErrorMessage = "* Materno Obligatorio")]
            public object ApeMaterno { get; set; }

            [Required(ErrorMessage = "* Nombres Obligatorio")]
            public object Nombres { get; set; }

            [Required(ErrorMessage = "* F. Nac. Obligatorio")]
            public object FechaNacimiento { get; set; }

            [Required(ErrorMessage = "* Número Obligatorio")]
            [StringLength(8, ErrorMessage = "* Número No Valido", MinimumLength = 8)]
            [RegularExpression("([0-9]{8,8}$)", ErrorMessage = "Dni Solo Numeros")]
            public object NroDI { get; set; }

            [RegularExpression("^[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,4})$", ErrorMessage = "* Correo No Válido")]
            public object Emailpersonal { get; set; }

            [RegularExpression("^[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,4})$", ErrorMessage = "* Correo No Válido")]
            public object EmailCoorporativo { get; set; }
        }
    }
}